if(LITE_WITH_FPGA OR LITE_WITH_BM OR LITE_WITH_MLU OR (NOT LITE_WITH_X86 AND NOT LITE_WITH_ARM))
  return()
endif()

lite_cc_test(test_kernel_conv_compute SRCS conv_compute_test.cc)
lite_cc_test(test_kernel_conv_transpose_compute SRCS conv_transpose_compute_test.cc)
lite_cc_test(test_kernel_deformable_conv_compute SRCS deformable_conv_compute_test.cc)
lite_cc_test(test_kernel_scale_compute SRCS scale_compute_test.cc)
lite_cc_test(test_kernel_shuffle_channel_compute SRCS shuffle_channel_compute_test.cc)
lite_cc_test(test_kernel_yolo_box_compute SRCS yolo_box_compute_test.cc)
lite_cc_test(test_kernel_fc_compute SRCS fc_compute_test.cc)
lite_cc_test(test_kernel_elementwise_compute SRCS elementwise_compute_test.cc)
lite_cc_test(test_kernel_lrn_compute SRCS lrn_compute_test.cc)
lite_cc_test(test_kernel_decode_bboxes_compute SRCS decode_bboxes_compute_test.cc)
lite_cc_test(test_kernel_box_coder_compute SRCS box_coder_compute_test.cc)
lite_cc_test(test_kernel_activation_compute SRCS activation_compute_test.cc)
lite_cc_test(test_kernel_argmax_compute SRCS argmax_compute_test.cc)
lite_cc_test(test_kernel_inverse_compute SRCS inverse_compute_test.cc)
lite_cc_test(test_kernel_reverse_compute SRCS reverse_compute_test.cc)
lite_cc_test(test_kernel_index_select_compute SRCS index_select_compute_test.cc)
lite_cc_test(test_kernel_axpy_compute SRCS axpy_compute_test.cc)
lite_cc_test(test_kernel_norm_compute SRCS norm_compute_test.cc)
lite_cc_test(test_kernel_cast_compute SRCS cast_compute_test.cc)
lite_cc_test(test_kernel_instance_norm_compute SRCS instance_norm_compute_test.cc)
lite_cc_test(test_kernel_grid_sampler_compute SRCS grid_sampler_compute_test.cc)
lite_cc_test(test_kernel_group_norm_compute SRCS group_norm_compute_test.cc)
lite_cc_test(test_kernel_sequence_softmax_compute SRCS sequence_softmax_compute_test.cc)
#lite_cc_test(test_kernel_im2sequence_compute SRCS im2sequence_compute_test.cc)
lite_cc_test(test_kernel_compare_compute SRCS compare_compute_test.cc)
lite_cc_test(test_kernel_logical_compute SRCS logical_compute_test.cc)
lite_cc_test(test_kernel_topk_compute SRCS topk_compute_test.cc)
lite_cc_test(test_kernel_topk_v2_compute SRCS topk_v2_compute_test.cc)
lite_cc_test(test_kernel_increment_compute SRCS increment_compute_test.cc)
lite_cc_test(test_kernel_write_to_array_compute SRCS write_to_array_compute_test.cc)
lite_cc_test(test_kernel_read_from_array_compute SRCS read_from_array_compute_test.cc)
lite_cc_test(test_kernel_concat_compute SRCS concat_compute_test.cc)
lite_cc_test(test_kernel_transpose_compute SRCS transpose_compute_test.cc)
lite_cc_test(test_kernel_reshape_compute SRCS reshape_compute_test.cc)
lite_cc_test(test_kernel_layer_norm_compute SRCS layer_norm_compute_test.cc)
lite_cc_test(test_kernel_dropout_compute SRCS dropout_compute_test.cc)
lite_cc_test(test_kernel_softmax_compute SRCS softmax_compute_test.cc)
lite_cc_test(test_kernel_mul_compute SRCS mul_compute_test.cc)
lite_cc_test(test_kernel_multiclass_nms_compute SRCS multiclass_nms_compute_test.cc)
lite_cc_test(test_kernel_multiclass_nms3_compute SRCS multiclass_nms3_compute_test.cc)
lite_cc_test(test_kernel_batch_norm_compute SRCS batch_norm_compute_test.cc)
lite_cc_test(test_kernel_pool_compute SRCS pool_compute_test.cc)
lite_cc_test(test_kernel_fill_constant_compute SRCS fill_constant_compute_test.cc)
lite_cc_test(test_kernel_fill_zeros_like_compute SRCS fill_zeros_like_compute_test.cc)
lite_cc_test(test_kernel_fill_constant_batch_size_like_compute SRCS fill_constant_batch_size_like_compute_test.cc)
lite_cc_test(test_kernel_crop_tensor_compute SRCS crop_tensor_compute_test.cc)
lite_cc_test(test_kernel_crop_compute SRCS crop_compute_test.cc)
lite_cc_test(test_elementwise_common_broadcast SRCS elementwise_common_broadcast_test.cc)
lite_cc_test(test_split SRCS split_test.cc)
lite_cc_test(test_kernel_pad2d_compute SRCS pad2d_compute_test.cc)
lite_cc_test(test_kernel_prior_box_compute SRCS prior_box_compute_test.cc)
lite_cc_test(test_kernel_negative_compute SRCS negative_compute_test.cc)
lite_cc_test(test_kernel_interp_compute SRCS interp_compute_test.cc)
lite_cc_test(test_kernel_shape_compute SRCS shape_compute_test.cc)
lite_cc_test(test_kernel_is_empty_compute SRCS is_empty_compute_test.cc)
lite_cc_test(test_kernel_sequence_expand_compute SRCS sequence_expand_compute_test.cc)
lite_cc_test(test_kernel_squeeze_compute SRCS squeeze_compute_test.cc)
lite_cc_test(test_kernel_slice_compute SRCS slice_compute_test.cc)
lite_cc_test(test_kernel_strided_slice_compute SRCS strided_slice_compute_test.cc)
lite_cc_test(test_kernel_expand_compute SRCS expand_compute_test.cc)
lite_cc_test(test_kernel_expand_as_compute SRCS expand_as_compute_test.cc)
lite_cc_test(test_kernel_expand_v2_compute SRCS expand_v2_compute_test.cc)
lite_cc_test(test_kernel_tile_compute SRCS tile_compute_test.cc)
lite_cc_test(test_kernel_sum_compute SRCS sum_compute_test.cc)
lite_cc_test(test_kernel_matmul_compute SRCS matmul_compute_test.cc)
lite_cc_test(test_kernel_flatten_compute SRCS flatten_compute_test.cc)
lite_cc_test(test_kernel_p_norm_compute SRCS p_norm_compute_test.cc)
lite_cc_test(test_kernel_meshgrid_compute SRCS meshgrid_compute_test.cc)
lite_cc_test(test_kernel_adaptive_pool_compute SRCS adaptive_pool_compute_test.cc)
#lite_cc_test(test_kernel_crf_decoding_compute SRCS crf_decoding_compute_test.cc)
#lite_cc_test(test_uniform_random_compute SRCS uniform_random_compute_test.cc)

if(LITE_BUILD_EXTRA)
    lite_cc_test(test_gru_unit SRCS gru_unit_test.cc)
    lite_cc_test(test_scatter_nd_add SRCS scatter_nd_add_test.cc)
    lite_cc_test(test_sequence_pad SRCS sequence_pad_test.cc)
    lite_cc_test(test_sequence_mask SRCS sequence_mask_test.cc)
    lite_cc_test(test_sequence_reverse SRCS sequence_reverse_test.cc)
    lite_cc_test(test_correlation SRCS correlation_test.cc)
    lite_cc_test(test_cos_sim SRCS cos_sim_test.cc)
    lite_cc_test(test_fill_any_like SRCS fill_any_like_test.cc)
    lite_cc_test(test_lookup_table_v2 SRCS lookup_table_v2_test.cc)
    #lite_cc_test(test_kernel_sequence_pool_compute SRCS sequence_pool_compute_test.cc)
    lite_cc_test(test_kernel_sequence_conv_compute SRCS sequence_conv_compute_test.cc)
    lite_cc_test(test_kernel_unsqueeze_compute SRCS unsqueeze_compute_test.cc)
    lite_cc_test(test_kernel_assign_compute SRCS assign_compute_test.cc)
    lite_cc_test(test_kernel_assign_value_compute SRCS assign_value_compute_test.cc)
    lite_cc_test(test_kernel_box_clip_compute SRCS box_clip_compute_test.cc)
    lite_cc_test(test_kernel_reduce_max_compute SRCS reduce_max_compute_test.cc)
    lite_cc_test(test_kernel_reduce_min_compute SRCS reduce_min_compute_test.cc)
    lite_cc_test(test_kernel_reduce_mean_compute SRCS reduce_mean_compute_test.cc)
    lite_cc_test(test_kernel_reduce_sum_compute SRCS reduce_sum_compute_test.cc)
    lite_cc_test(test_kernel_reduce_all_compute SRCS reduce_all_compute_test.cc)
    lite_cc_test(test_kernel_reduce_any_compute SRCS reduce_any_compute_test.cc)
    lite_cc_test(test_kernel_reduce_prod_compute SRCS reduce_prod_compute_test.cc)
    lite_cc_test(test_kernel_stack_compute SRCS stack_compute_test.cc)
    lite_cc_test(test_kernel_unstack_compute SRCS unstack_compute_test.cc)
    lite_cc_test(test_kernel_range_compute SRCS range_compute_test.cc)
    lite_cc_test(test_kernel_affine_channel_compute SRCS affine_channel_compute_test.cc)
    lite_cc_test(test_kernel_affine_grid_compute SRCS affine_grid_compute_test.cc)
    lite_cc_test(test_kernel_anchor_generator_compute SRCS anchor_generator_compute_test.cc)
    lite_cc_test(test_kernel_matrix_nms_compute SRCS matrix_nms_compute_test.cc)

    lite_cc_test(test_kernel_generate_proposals_compute SRCS generate_proposals_compute_test.cc)
    lite_cc_test(test_kernel_roi_align_compute SRCS roi_align_compute_test.cc)
    lite_cc_test(test_kernel_search_aligned_mat_mul_compute SRCS search_aligned_mat_mul_compute_test.cc)
    lite_cc_test(test_kernel_search_seq_fc_compute SRCS search_seq_fc_compute_test.cc)
    lite_cc_test(test_kernel_lookup_table_compute SRCS lookup_table_compute_test.cc)
    lite_cc_test(test_kernel_lookup_table_dequant_compute SRCS lookup_table_dequant_compute_test.cc)
    lite_cc_test(test_kernel_gather_nd_compute SRCS gather_nd_compute_test.cc)
    lite_cc_test(test_kernel_gather_compute SRCS gather_compute_test.cc)
    lite_cc_test(test_kernel_gather_tree_compute SRCS gather_tree_compute_test.cc)
    lite_cc_test(test_kernel_ctc_align_compute SRCS ctc_align_compute_test.cc)
    lite_cc_test(test_kernel_cumsum_compute SRCS cumsum_compute_test.cc)
    lite_cc_test(test_kernel_polygon_box_transform_compute SRCS polygon_box_transform_compute_test.cc)
    lite_cc_test(test_kernel_clip_compute SRCS clip_compute_test.cc)
    lite_cc_test(test_kernel_pixel_shuffle_compute SRCS pixel_shuffle_compute_test.cc)
    lite_cc_test(test_kernel_scatter_compute SRCS scatter_compute_test.cc)
    lite_cc_test(test_kernel_sequence_expand_as_compute SRCS sequence_expand_as_compute_test.cc)
    lite_cc_test(test_kernel_sin_compute SRCS sin_compute_test.cc)
    lite_cc_test(test_kernel_cos_compute SRCS cos_compute_test.cc)
    lite_cc_test(test_kernel_tril_triu_compute SRCS tril_triu_compute_test.cc)
    lite_cc_test(test_kernel_pad3d_compute SRCS pad3d_compute_test.cc)
    lite_cc_test(test_kernel_select_input_compute SRCS select_input_compute_test.cc)
    lite_cc_test(test_kernel_pow_compute SRCS pow_compute_test.cc)
    lite_cc_test(test_kernel_where_compute SRCS where_compute_test.cc)
    lite_cc_test(test_kernel_log_softmax_compute SRCS log_softmax_compute_test.cc)
    # lite_cc_test(test_kernel_tensor_array_to_tensor_compute SRCS tensor_array_to_tensor_compute_test.cc)
    # TODO: fix tensor_array_to_tensor unittest
    
    # for training kernel
    if (LITE_WITH_TRAIN)
        lite_cc_test(test_kernel_mean_compute SRCS mean_compute_test.cc)
        lite_cc_test(test_kernel_activation_grad_compute SRCS activation_grad_compute_test.cc)
        lite_cc_test(test_kernel_elementwise_grad_compute SRCS elementwise_grad_compute_test.cc)
        lite_cc_test(test_kernel_mul_grad_compute SRCS mul_grad_compute_test.cc)
        lite_cc_test(test_kernel_sgd_compute SRCS sgd_compute_test.cc)
        lite_cc_test(test_kernel_sequence_pool_grad_compute SRCS sequence_pool_grad_compute_test.cc)
    endif()
endif()
